package com.jackrain.nea.service;

import com.alibaba.dubbo.config.annotation.Service;
import com.jackrain.nea.web.QueryCmd;
import com.jackrain.nea.web.query.QueryRequest;
import com.jackrain.nea.web.service.QueryService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.HashMap;

/**
 * @author nathan
 * 分库查询
 */
@Slf4j
@Component("QueryCmdImpl-cp")
@Service(protocol = "dubbo", validation = "true", version = "2", group = "cp")
public class QueryCmdImpl implements QueryCmd {
    @Autowired
    private QueryService queryService;

    @Override
    public Object queryTable(HashMap hashMap) {
        return queryService.queryTable(hashMap);
    }

    @Override
    public Object queryResult(QueryRequest request) {
        return queryService.queryResult(request);
    }

    @Override
    public Long commandInsert(HashMap hashMap) {
        return queryService.commandInsert(hashMap);
    }

    @Override
    public Integer commandUpdate(HashMap hashMap) {
        return queryService.commandUpdate(hashMap);
    }

    @Override
    public Integer commandDelete(HashMap hashMap) {
        return queryService.commandDelete(hashMap);
    }

    @Override
    public Object queryfuzzyTable(HashMap hashMap) {
        return queryService.queryfuzzyTable(hashMap);
    }
}
